﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SearchPost.aspx.cs" Inherits="WXYW.SearchPost" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    公告查询
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox><asp:LinkButton
        ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton><asp:LinkButton
            ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <asp:GridView ID="PostGridView" runat="server" AutoGenerateColumns="False" CssClass="tableList"
        Width="100%" OnRowDataBound="PostGridView_RowDataBound" AllowPaging="True" PageSize="20"
        OnRowCommand="PostGridView_RowCommand" 
        OnDataBound="PostGridView_DataBound" 
        onpageindexchanging="PostGridView_PageIndexChanging">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="新闻标题">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="Label2" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("Title") %>' ReadOnly="true" Width="195px"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="200px" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="作者">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Author") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="公告类型">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("PostType") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="关键字">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>                   
                    <asp:TextBox ID="Label5" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("Keyword") %>' ReadOnly="true" Width="145px"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="150px"/>
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="新闻来源">
               <EditItemTemplate>
                    <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                     <asp:Label ID="Label6" runat="server" Text='<%# Bind("Source") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False"  />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="发布日期">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("PublishDate") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="公告对象">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("Target") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Bind("Target") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="状态">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("Status") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label9" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                <ItemTemplate>
                    <img src="image/operateicon/docview.gif" alt="" />
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="ViewPost"
                        Text="查看" CommandArgument='<%# Bind("ID") %>'></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
            本类记录<span style="color: Red"><%= PostGridView.Rows.Count%></span>条, <span style="color: Red">
                20</span>条/页 当前 <span style="color: Red">
                    <%= PostGridView.PageIndex + 1%>/<%= PostGridView.PageCount%></span>页
            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                    ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                    ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </asp:GridView>
</asp:Content>
